#ifndef __util_h_
#define __util_h_
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <signal.h>

#define max(x, y) ({\
        x > y ? x : y;})

int Socket(int, int, int);
void Connect(int, const struct sockaddr *, socklen_t);
void Bind(int, const struct sockaddr *, socklen_t);
void Listen(int, int);
int Accept(int, struct sockaddr *, socklen_t *);
void Close(int);
ssize_t Readn(int, void*, size_t);
ssize_t Writen(int, const void *, size_t);
ssize_t Readline(int, void*, size_t);
void Inet_pton(int, const char *, void *);
void Inet_ntop(int, const void *, char *, size_t);

typedef void Sigfunc(int);
Sigfunc *Signal(int, Sigfunc *);


#endif
